package cn.nubia.admin.application.bean;

import cn.nubia.admin.common.utils.DateUtil;
import cn.nubia.admin.sysconfig.bean.CategoryConstruct;

/**
 * Created by justin on 15/7/7.
 */
public class SoftUSoftItem {

    private Integer softId;

    private Integer softItemId;

    private String softName;

    private String packageName;

    private String versionName;

    private Integer vdownloadNumber;

    private Integer categoryId;

    private String categoryName;

    private String firstCategoryName;

    private String secCategoryName;

    private String thirdCategoryName;

    private Integer isLastVersion;

    private String checkAdminName;

    private Integer publishTime;

    private Integer state;

    private String iconUrl;

    private String publishTimeShow;

    public void initCategoryName(CategoryConstruct categoryConstruct) {
        if(categoryConstruct!=null){
            this.setFirstCategoryName(categoryConstruct.getFirstCategoryName());
            this.setSecCategoryName(categoryConstruct.getSecCategoryName());
            this.setThirdCategoryName(categoryConstruct.getThirdCategoryName());
        }
    }

    public String getIconUrl() {
        return iconUrl;
    }

    public void setIconUrl(String iconUrl) {
        this.iconUrl = iconUrl;
    }

    public Integer getSoftId() {
        return softId;
    }

    public void setSoftId(Integer softId) {
        this.softId = softId;
    }

    public Integer getSoftItemId() {
        return softItemId;
    }

    public void setSoftItemId(Integer softItemId) {
        this.softItemId = softItemId;
    }

    public String getSoftName() {
        return softName;
    }

    public void setSoftName(String softName) {
        this.softName = softName;
    }

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public String getVersionName() {
        return versionName;
    }

    public void setVersionName(String versionName) {
        this.versionName = versionName;
    }

    public Integer getVdownloadNumber() {
        return vdownloadNumber;
    }

    public void setVdownloadNumber(Integer vdownloadNumber) {
        this.vdownloadNumber = vdownloadNumber;
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public Integer getIsLastVersion() {
        return isLastVersion;
    }

    public void setIsLastVersion(Integer isLastVersion) {
        this.isLastVersion = isLastVersion;
    }

    public String getCheckAdminName() {
        return checkAdminName;
    }

    public void setCheckAdminName(String checkAdminName) {
        this.checkAdminName = checkAdminName;
    }

    public Integer getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(Integer publishTime) {
        this.publishTime = publishTime;
        if(publishTime > 0){
            this.setPublishTimeShow(DateUtil.getFormatDate(publishTime));
        }
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getPublishTimeShow() {
        return publishTimeShow;
    }

    public void setPublishTimeShow(String publishTimeShow) {
        this.publishTimeShow = publishTimeShow;
    }

    public String getThirdCategoryName() {
        return thirdCategoryName;
    }

    public void setThirdCategoryName(String thirdCategoryName) {
        this.thirdCategoryName = thirdCategoryName;
    }

    public String getSecCategoryName() {
        return secCategoryName;
    }

    public void setSecCategoryName(String secCategoryName) {
        this.secCategoryName = secCategoryName;
    }

    public String getFirstCategoryName() {
        return firstCategoryName;
    }

    public void setFirstCategoryName(String firstCategoryName) {
        this.firstCategoryName = firstCategoryName;
    }
}
